package com.yunyao.framework.service;

import com.yunyao.common.dto.ReconciliationDto;
import com.yunyao.common.dto.SpReconciliationDto;
import com.yunyao.common.dto.excel.ReconciliationExcelDto;
import com.yunyao.common.dto.excel.SupplyExcelDto;
import com.yunyao.common.web.util.PageResult;
import com.yunyao.common.web.util.YResult;
import com.yunyao.framework.dto.reconciliation.ReconciliationConfirmDto;
import com.yunyao.framework.dto.sale.SaleContractApprovalDto;
import com.yunyao.framework.dto.sale.SaleContractSubmitApprovalDto;
import com.yunyao.framework.dto.spreconciliatioin.SpReconciliationApprovalDto;
import com.yunyao.framework.dto.spreconciliatioin.SpReconciliationConfirmDto;
import com.yunyao.framework.dto.spreconciliatioin.SpReconciliationSaveDto;
import com.yunyao.framework.dto.spreconciliatioin.SpReconciliationSubmitApprovalDto;
import com.yunyao.framework.dto.supplier.SupplierSettlementSaveDto;
import com.yunyao.framework.vo.reconciliation.ReconciliationinfoVO;
import com.yunyao.framework.vo.spreconciliation.SpReconciliationInfoVO;
import com.yunyao.framework.vo.spreconciliation.SpReconciliationVO;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.List;

/*
* 供应商对账
* */

public interface SpReconciliationService {

    /**
     * 获取供应商对账列表
     * @param spReconciliationDto
     * @return
     * */
    YResult<PageResult<SpReconciliationVO>> pageList(SpReconciliationDto spReconciliationDto);
    /**
     * 根据Id获取供应商对账信息
     * @param id
     * @return
     * */
    YResult<SpReconciliationInfoVO> getSpReconliationById(Long id);

    YResult<SpReconciliationInfoVO> getInfo(SpReconciliationDto spReconciliationDto);

    BigDecimal getSupplySettlementSum(@NotBlank String contractId);

    /**
     * 保存项目对账列表信息
     * @param saveDto
     * @return
     * */
    YResult<String> saveInfo(SpReconciliationSaveDto saveDto);

    YResult<String> save(SpReconciliationSaveDto spReconciliationSaveDto);

    YResult<Boolean> deleteInfo(SpReconciliationSaveDto saveDto);

    /**
     * 提交审批
     *
     * @param approvalDto
     * @return
     */
    YResult<String> submitApproval(SpReconciliationSubmitApprovalDto approvalDto);

    /**
     * 审批
     * @param approvalDto
     * @return
     */
    YResult<String> approval(SpReconciliationApprovalDto approvalDto);


    YResult<String> confirm(SpReconciliationConfirmDto spReconciliationConfirmDto);

    YResult<String> check(SpReconciliationConfirmDto spReconciliationConfirmDto);
    YResult<String> ycconfirm(SpReconciliationConfirmDto spReconciliationConfirmDto);

    List<ReconciliationExcelDto> export(SpReconciliationDto spReconciliationDto);
}
